export const PAGE_CODE = 'dcs-afterSales-goodwillSettlement';
import {PAGE} from '../constants';

//设置管理员权限
export const PERMISSION = {
    add: 'add',
    update: 'update',
    abandon: 'abandon',
    send: 'send',
    exportPi: 'exportPi',
    upload: 'upload',
    confirm: 'confirm',
    exportCover: 'exportCover'
};
//重置常量
export const DEFAULT_QUERY_OPTION = {
    brandId: '',
    dealerId: '',
    code: '',
    goodWillCode: '',
    submitTime: [],
    uplpadTime: [],
    status: [],
    pageIndex: PAGE.index,
    pageSize: PAGE.size,
    sortField: 'code',
    isDesc: true,
};

export const hasPermissions = (data, name) => Array.isArray(data) && data.length > 0 && data.some(item => item === name);
